<?php


/**
 * 竞标币类型
 * Enter description here ...
 * @author Admin
 *
 */
class PackageModel extends CommonModel {
	
	
	/**
	 * 获取竞标币类型销售套餐
	 * 图片存储在img目录下
	 * @see CommonModel::getdata()
	 */
	/*
	public function getdata($map,$limit,$field = 'P.*,A.path as apath'){
		$prefix = C('DB_PREFIX');
		if (is_array($field)){
			$field = implode(',',$field);
		}
    	$data = $this->Table("{$prefix}package as P")->
					  join("{$prefix}accessory as A ON P.path = A.id")->
					  field($field)->where($map)->
					  order('P.id asc')->limit($limit)->findAll();
		return $data;
	}
	*/
	//图片存储在upload下
	public function getdata($map,$limit,$field = 'P.*'){
		$prefix = C('DB_PREFIX');
		if (is_array($field)){
			$field = implode(',',$field);
		}
    	$data = $this->Table("{$prefix}package as P")->
					  field($field)->where($map)->
					  order('P.id asc')->limit($limit)->findAll();
		return $data;
	}
	
	
	
	
}
?>